import java.util.Random;
import java.util.Scanner;
public class RPG3 {
RPG2 meow = new RPG2();
RPG roof = new RPG();
int playerhp;
int orcattack = 100;
int fireball;
int swordattack;
int input;
int result;
int result2;
int result3;
int orchp = 0;
int type;
int sword;
int final_result;
int result4;
int input2;
int mana = 60;
Scanner scan = new Scanner(System.in);
	Random rand = new Random();
	public void fight1(){
		meow.gethealth();
		meow.getType();
		meow.getMana();
		try {
			Thread.sleep(2000);
			} catch(InterruptedException e) {
			} 
		
		
		System.out.println("Orc: You wont last for long");
		try {
			Thread.sleep(2000);
			} catch(InterruptedException e) {
			} 
	
		fireball = rand.nextInt(20) +40;
			System.out.println("<1 cast fireball>");
			result = scan.nextInt();
			if (result == 1){
				orchp = 100-fireball;
			input2= 60-10;
				System.out.println("You have " +input2 +  " mana left");
				System.out.println("You hit the orc for: " + fireball );
			
	System.out.println("It is the orcs turn to attack");
result4 = 400-orcattack;	
System.out.println ("You now have " + result4 + " hp!");
			fireball = rand.nextInt(20) +40;
				System.out.println("<1 cast fireball>");
				result = scan.nextInt();
				if (result == 1){
				result3	 = orchp-fireball;
				final_result=result3-orchp;
				System.out.println("You have 40  mana left");
					System.out.println("You hit the orc for: " + fireball + " damage" );
					if (final_result <= 0){
						System.out.println("The orc died!");
					}
				}
			}
				}
		public void fight2(){
			sword = rand.nextInt(20) +40;
			System.out.println("<1> Thrust sword");
			result = scan.nextInt();
			if (result == 1){
				result3 = orchp-sword;
		final_result=result3-orchp;
		
		sword = rand.nextInt(20) +40;
		System.out.println("<1> Thrust sword");
		result = scan.nextInt();
		if (result == 1){
			orchp = 100-sword;
			System.out.println("You hit the orc for" + sword);
		}
				System.out.println("You hit the orc for" + sword);
				if (final_result <= 0){
					System.out.println("The orc died!");
				}
			}
		
	
		

			
		
		
		
		
		
}
}

	


